package com.huatai.datacenter.entity.datamodel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * 映射模型字段实体类
 *
 * @author lizhong
 * @date 2023年8月2日
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_mapping_model_field")
@ApiModel(value = "映射模型字段实体类", description = "映射模型字段实体类")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MappingModelFieldEntity extends DataModelBaseEntity {

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "字段id", required = true)
	@NotNull(message = "修改时字段id必传")
	private Long id;

	@TableField("mapping_model_id")
	@ApiModelProperty(value = "映射模型id", required = true)
	private Long mappingModelId;

	// 要与数据模型的字段一一对应
	@TableField("data_model_field_id")
	@ApiModelProperty(value = "对应的数据模型字段id", required = true)
	private Long dataModelFieldId;

	@TableField("data_model_field_name")
	@ApiModelProperty(value = "对应的数据模型字段名称", required = true)
	private String dataModelFieldName;

	@TableField("data_model_field_cn_name")
	@ApiModelProperty("对应的数据模型字段中文名称")
	private String dataModelFieldCnName;

	@TableField("field_name")
	@ApiModelProperty(value = "字段名称", required = true)
	private String fieldName;

	@TableField("field_cn_name")
	@ApiModelProperty("字段中文名称")
	private String fieldCnName;

	@TableField("remark")
	@ApiModelProperty("备注/描述")
	private String remark;
}
